import request from '@/utils/request'
import Vue from 'vue'

// 获取采购列表接口
export const getPurchaseList = data => {
    return request({
        url: Vue.prototype.$api.purchase.getPurchaseList,
        method: 'post',
        data,
    })
}
// 获取到货状态接口
export const getArrivalStatus = data => {
    return request({
        url: Vue.prototype.$api.purchase.getArrivalStatus,
        method: 'post',
        data,
    })
}
// 获取交货进度接口
export const getDeliveryStatus = data => {
    return request({
        url: Vue.prototype.$api.purchase.getDeliveryStatus,
        method: 'post',
        data,
    })
}
// 到货信息列表
export const getArriveList = data => {
    return request({
        url: Vue.prototype.$api.purchase.getArriveList,
        method: 'post',
        data,
    })
}
// 到货次品列表
export const getPantsList = data => {
    return request({
        url: Vue.prototype.$api.purchase.getPantsList,
        method: 'post',
        data,
    })
}
// 采购到货统计接口
export const countInventoryList = data => {
    return request({
        url: Vue.prototype.$api.purchase.countInventoryList,
        method: 'post',
        data,
    })
}
// 次品详情接口
export const getDefectiveInfo = data => {
    return request({
        url: Vue.prototype.$api.purchase.getDefectiveInfo,
        method: 'post',
        data,
    })
}
// 编辑次品列表接口
export const editDefectiveInfo = data => {
    return request({
        url: Vue.prototype.$api.purchase.editDefectiveInfo,
        method: 'post',
        data,
    })
}

export const getDownPurchase = data => {
    return request({
        url: Vue.prototype.$api.purchase.getDownPurchase,
        method: 'post',
        data,
    })
}
export const getDownPurchaseDetail = data => {
    return request({
        url: Vue.prototype.$api.purchase.getDownPurchaseDetail,
        method: 'post',
        data,
    })
}
export const getPurchaser = data => {
    return request({
        url: Vue.prototype.$api.purchase.getPurchaser,
        method: 'post',
        data,
    })
}
export const getPurchaserList = data => {
    return request({
        url: Vue.prototype.$api.purchase.getPurchaserList,
        method: 'post',
        data,
    })
}
export const addPurchaseDown = data => {
    return request({
        url: Vue.prototype.$api.purchase.addPurchaseDown,
        method: 'post',
        data,
    })
}
export const getPurchaseDown = data => {
    return request({
        url: Vue.prototype.$api.purchase.getPurchaseDown,
        method: 'post',
        data,
    })
}
export const editPurchaseDown = data => {
    return request({
        url: Vue.prototype.$api.purchase.editPurchaseDown,
        method: 'post',
        data,
    })
}
export const getTrackList = data => {
    return request({
        url: Vue.prototype.$api.purchase.getTrackList,
        method: 'post',
        data,
    })
}
export const editTrackNumber = data => {
    return request({
        url: Vue.prototype.$api.purchase.editTrackNumber,
        method: 'post',
        data,
    })
}

export const getPurchaseOrderList = data => {
    return request({
        url: Vue.prototype.$api.purchase.getPurchaseOrderList,
        method: 'post',
        data,
    })
}
export const getWarehouseSkuImport = data => {
    return request({
        url: Vue.prototype.$api.purchase.getWarehouseSkuImport,
        method: 'post',
        data,
    })
}
export const submitDownPurchase = data => {
    return request({
        url: Vue.prototype.$api.purchase.submitDownPurchase,
        method: 'post',
        data,
    })
}
export const pass_check = data => {
    return request({
        url: Vue.prototype.$api.purchase.pass_check,
        method: 'post',
        data,
    })
}
export const pass_reject = data => {
    return request({
        url: Vue.prototype.$api.purchase.pass_reject,
        method: 'post',
        data,
    })
}
export const add_remark = data => {
    return request({
        url: Vue.prototype.$api.purchase.add_remark,
        method: 'post',
        data,
    })
}
export const purchase_insert_info = data => {
    return request({
        url: Vue.prototype.$api.purchase.purchase_insert_info,
        method: 'post',
        data,
    })
}
export const purchase_insert = data => {
    return request({
        url: Vue.prototype.$api.purchase.purchase_insert,
        method: 'post',
        data,
    })
}
export const end_purchase = data => {
    return request({
        url: Vue.prototype.$api.purchase.end_purchase,
        method: 'post',
        data,
    })
}
export const getPurchaseChange = data => {
    return request({
        url: Vue.prototype.$api.purchase.getPurchaseChange,
        method: 'post',
        data,
    })
}
export const purchase_change_info = data => {
    return request({
        url: Vue.prototype.$api.purchase.purchase_change_info,
        method: 'post',
        data,
    })
}
export const purchase_change_edit = data => {
    return request({
        url: Vue.prototype.$api.purchase.purchase_change_edit,
        method: 'post',
        data,
    })
}
export const purchase_change_pass = data => {
    return request({
        url: Vue.prototype.$api.purchase.purchase_change_pass,
        method: 'post',
        data,
    })
}
export const get_store_record = data => {
    return request({
        url: Vue.prototype.$api.purchase.get_store_record,
        method: 'post',
        data,
    })
}
export const in_store_log = data => {
    return request({
        url: Vue.prototype.$api.purchase.in_store_log,
        method: 'post',
        data,
    })
}
export const get_1688_address = () => {
    return request({
        url: Vue.prototype.$api.purchase.get_1688_address,
        method: 'post',
    })
}
// 获取单个1688产品信息接口
export const get_1688_url = data => {
    return request({
        url: Vue.prototype.$api.purchase.get_1688_url,
        method: 'post',
        data,
    })
}
// get_1688_one
export const get_1688_one = data => {
    return request({
        url: Vue.prototype.$api.purchase.get_1688_one,
        method: 'post',
        data,
    })
}
// 单个sku产品勾选后保存接口
export const add_1688_url = data => {
    return request({
        url: Vue.prototype.$api.purchase.add_1688_url,
        method: 'post',
        data,
    })
}
// 1688商品配对列表接口
export const get_1688_product =data => {
    return request({
        url: Vue.prototype.$api.purchase.get_1688_product,
        method: 'post',
        data,
    })
}
// 获取手动配对的sku信息接口
export const get_skus_info = data => {
    return request({
        url: Vue.prototype.$api.purchase.get_skus_info,
        method: 'post',
        data,
    })
}
// change_pair
export const change_pair = data => {
    return request({
        url: Vue.prototype.$api.purchase.change_pair,
        method: 'post',
        data,
    })
}
// update_1688
export const update_1688 = data => {
    return request({
        url: Vue.prototype.$api.purchase.update_1688,
        method: 'post',
        data,
    })
}
// release_1688
export const release_1688 = data => {
    return request({
        url: Vue.prototype.$api.purchase.release_1688,
        method: 'post',
        data,
    })
}
// delete_1688
export const delete_1688 = data => {
    return request({
        url: Vue.prototype.$api.purchase.delete_1688,
        method: 'post',
        data,
    })
}
// createOrder
export const createOrder = data => {
    return request({
        url: Vue.prototype.$api.purchase.createOrder,
        method: 'post',
        data,
    })
}
// getSuggestList
export const getSuggestList = data => {
    return request({
        url: Vue.prototype.$api.purchase.getSuggestList,
        method: 'post',
        data,
    })
}
// unPurchase
export const unPurchase = data => {
    return request({
        url: Vue.prototype.$api.purchase.unPurchase,
        method: 'post',
        data,
    })
}
// addRemark
export const addRemark = data => {
    return request({
        url: Vue.prototype.$api.purchase.addRemark,
        method: 'post',
        data,
    })
}
// changeSupply
export const changeSupply = data => {
    return request({
        url: Vue.prototype.$api.purchase.changeSupply,
        method: 'post',
        data,
    })
}
// addPurchasePlan
export const addPurchasePlan = data => {
    return request({
        url: Vue.prototype.$api.purchase.addPurchasePlan,
        method: 'post',
        data,
    })
}
// updatePurchaseQuantity
export const updatePurchaseQuantity = data => {
    return request({
        url: Vue.prototype.$api.purchase.updatePurchaseQuantity,
        method: 'post',
        data,
    })
}
// carPlan
export const carPlan = data => {
    return request({
        url: Vue.prototype.$api.purchase.carPlan,
        method: 'post',
        data,
    })
}
// suggestPlan
export const suggestPlan = data => {
    return request({
        url: Vue.prototype.$api.purchase.suggestPlan,
        method: 'post',
        data,
    })
}
// delPlan
export const delPlan = data => {
    return request({
        url: Vue.prototype.$api.purchase.delPlan,
        method: 'post',
        data,
    })
}
// editPlan
export const editPlan = data => {
    return request({
        url: Vue.prototype.$api.purchase.editPlan,
        method: 'post',
        data,
    })
}
// addPlanSku
export const addPlanSku = data => {
    return request({
        url: Vue.prototype.$api.purchase.addPlanSku,
        method: 'post',
        data,
    })
}

// editOperater
export const editOperater = data => {
    return request({
        url: Vue.prototype.$api.purchase.editOperater,
        method: 'post',
        data,
    })
}
// getShortageList
export const getShortageList = data => {
    return request({
        url: Vue.prototype.$api.purchase.getShortageList,
        method: 'post',
        data,
    })
}
// purchaseDetail
export const purchaseDetail = data => {
    return request({
        url: Vue.prototype.$api.purchase.purchaseDetail,
        method: 'post',
        data,
    })
}
// purchaseSubmit
export const purchaseSubmit = data => {
    return request({
        url: Vue.prototype.$api.purchase.purchaseSubmit,
        method: 'post',
        data,
    })
}
// submit_1688_order
export const submit_1688_order = data => {
    return request({
        url: Vue.prototype.$api.purchase.submit_1688_order,
        method: 'post',
        data,
    })
}

// getPlanSuggest
export const getPlanSuggest = data => {
    return request({
        url: Vue.prototype.$api.purchase.getPlanSuggest,
        method: 'post',
        data,
    })
}

// editPlanSuggest
export const editPlanSuggest = data => {
    return request({
        url: Vue.prototype.$api.purchase.editPlanSuggest,
        method: 'post',
        data,
    })
}
// deletePlanSuggest
export const deletePlanSuggest = data => {
    return request({
        url: Vue.prototype.$api.purchase.deletePlanSuggest,
        method: 'post',
        data,
    })
}
// remarkPlanSuggest
export const remarkPlanSuggest = data => {
    return request({
        url: Vue.prototype.$api.purchase.remarkPlanSuggest,
        method: 'post',
        data,
    })
}

// editSuggestSkuNums
export const editSuggestSkuNums = data => {
    return request({
        url: Vue.prototype.$api.purchase.editSuggestSkuNums,
        method: 'post',
        data,
    })
}
// editSuggestRate
export const editSuggestRate = data => {
    return request({
        url: Vue.prototype.$api.purchase.editSuggestRate,
        method: 'post',
        data,
    })
}
// getSpuSuggest
export const getSpuSuggest = data => {
    return request({
        url: Vue.prototype.$api.purchase.getSpuSuggest,
        method: 'post',
        data,
    })
}
// exportSpuSuggest
export const exportSpuSuggest = data => {
    return request({
        url: Vue.prototype.$api.purchase.exportSpuSuggest,
        method: 'post',
        data,
        responseType: 'blob',
    })
}
// exportSkuList
export const exportSkuList = data => {
    return request({
        url: Vue.prototype.$api.purchase.exportSkuList,
        method: 'post',
        data,
        responseType: 'blob',
    })
}
// planSuggestPlaceStatus
export const planSuggestPlaceStatus = data => {
    return request({
        url: Vue.prototype.$api.purchase.planSuggestPlaceStatus,
        method: 'post',
        data,
    })
}
// planSuggestCheckStatus
export const planSuggestCheckStatus = data => {
    return request({
        url: Vue.prototype.$api.purchase.planSuggestCheckStatus,
        method: 'post',
        data,
    })
}
// planSuggestCheckContract
export const planSuggestCheckContract = data => {
    return request({
        url: Vue.prototype.$api.purchase.planSuggestCheckContract,
        method: 'post',
        data,
    })
}
// exportSpuDetail
export const exportSpuDetail = data => {
    return request({
        url: Vue.prototype.$api.purchase.exportSpuDetail,
        method: 'post',
        data,
        responseType: 'blob',
    })
}